<template>
    <div>
    <button @click="add">增加{{msg}}{{num}}</button>
    </div>
</template>

<script setup>
    import {ref  ,defineProps,defineEmit} from 'vue'
    let emit = defineEmit(['click']);
    let props = defineProps({
        msg1:String
    })
    // ref:count = 1;
    ref:num = 1;
    const msg = ref(0)
    const color = ref('blue')
    const add = ()=>{
        msg.value++;
        emit('click')
    }
</script>

<style>
  button{
      color:v-bind(color)
  }
</style>
